﻿using MediatR;
using T_settlement.Domain;
using T_settlement.Infrastructure.Interfacec;
using T_settlement.Read.API.Application.Command.TollCommand;

namespace T_settlement.Read.API.Application.CommandHandlers.TollCommandHandlers
{
    public class FanTollCommandHandlers:IRequestHandler<FanTollCommand, Settlement>
    {
        private readonly lsettlementRepository lsettlementRepository;

        public FanTollCommandHandlers(lsettlementRepository lsettlementRepository)
        {
            this.lsettlementRepository = lsettlementRepository;
        }

        public async Task<Settlement> Handle(FanTollCommand request, CancellationToken cancellationToken)
        {
            var list = await lsettlementRepository.GetModelAsync(request.SettlementId);
            return list;

        }
    }
}
 